#include "../src/OriginImageModel.hpp"
#include <iostream>
#include <signal.h>
#include <chrono>
using namespace std::chrono_literals;

void NewImageCallback(const std::vector<ImageType> & images)
{
  std::cout<<"Get New Image "<<images.size()<<std::endl;
  for(auto & i : images)
    delete [] i.data;
}

void Handle_SIGINT(int)
{
  std::cout<<"Test Program exit"<<std::endl;
  exit(0);
}

int main()
{
  signal(SIGINT,Handle_SIGINT);
  OriginImageModel oriImage("/tmp/HBTY_server_ipc.yaml",NewImageCallback);
  oriImage.Boot();
  while(true)
    std::this_thread::sleep_for(1s);
}
